Don't factor bins into fingerprint calculations
authorAlex Crichton <alex@alexcrichton.com>
Sat, 21 Mar 2015 03:23:07 +0000 (20:23 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 21 Mar 2015 03:23:07 +0000 (20:23 -0700)
The dependency is just there to get them to compile, not to actually induce
recompiles.

src/cargo/ops/cargo_rustc/fingerprint.rs

index bbf1c15e0ba422f14ad2be1b003653fc94452105..dca21525c53cd5c168b6298978b6c6864e92bded 100644 (file)
@@ -169,11 +169,14 @@ fn calculate<'a, 'b>(cx: &mut Context<'a, 'b>,
                                    profile));
 
     // Next, recursively calculate the fingerprint for all of our dependencies.
+    //
     // Skip the fingerprints of build scripts as they may not always be
     // available and the dirtiness propagation for modification is tracked
-    // elsewhere
+    // elsewhere. Also skip fingerprints of binaries because they don't actually
+    // induce a recompile, they're just dependencies in the sense that they need
+    // to be built.
     let deps = try!(cx.dep_targets(pkg, target, profile).into_iter()
-                      .filter(|&(_, t, _)| !t.is_custom_build())
+                      .filter(|&(_, t, _)| !t.is_custom_build() && !t.is_bin())
                       .map(|(pkg, target, profile)| {
         let kind = match kind {
             Kind::Host => Kind::Host,